Skip to content

Conversation

@SamuelRoettgermann
Copy link
Contributor

@SamuelRoettgermann SamuelRoettgermann commented Sep 25, 2025

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) and too complex database calls.
  • I strictly followed the principle of data economy for all database calls.
  • I strictly followed the server coding and design guidelines.
  • I added multiple integration tests (Spring) related to the features (with a high test coverage).
  • I added pre-authorization annotations according to the guidelines and checked the course groups for all new REST Calls (security).
  • I documented the Java code using JavaDoc style.

Motivation and Context

The current iPad app used for attendance checking during exams is rather cumbersome to use. Because of this it was modernized to provide a more pleasant attendance checking time.

Description

This PR introduces the GET api/exam/courses/{courseId}/exams/{examId}/attendance-checker-information endpoint that allows instructors of a course to obtain information about the rooms and seating assignments for a given exam. This information is used by the iPad app that exam supervisors use for marking attendance.

The new attendance checker feature will also be usable by tutors and editors. However, this does not apply to the current attendance checker app.

Testing

The actual feature testing is done in this separate PR that introduces the modern iPad version: ls1intum/ArtemisExamChecker#43

Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Test Coverage

Summary by CodeRabbit

  • New Features

    • Attendance-checker API: returns exam metadata, rooms used, and student seating with planned and actual in-memory locations.
  • Repository

    • Added query to fetch rooms by exam to support attendance data.
  • API

    • New attendance endpoint with tutor-level access; multiple endpoints' access lowered to tutor-level.
  • DTO

    • New attendance DTOs and expanded exam-user DTO to include additional user and location fields.
  • Error Messages

    • Added "no students distributed"; removed redundant room/seat error keys.
  • Tests

    • Integration tests for attendance endpoint, roles, and distribution scenarios.

✏️ Tip: You can customize this high-level summary in your review settings.

… needs to be an AbstractAuditingEntity, still need to figure out what to do with capacity and if I even need it but might store capacity with the layouts directly
…l need to return a DTO, still need helper functions
coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 21, 2025
@SamuelRoettgermann SamuelRoettgermann temporarily deployed to artemis-test3.artemis.cit.tum.de November 21, 2025 19:42 — with GitHub Actions Inactive
@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report205 ran200 passed3 skipped2 failed1h 15m 26s 516ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/quiz-exercise/QuizExerciseDropLocation.spec.ts
ts.Quiz Exercise Drop Location Spec › DnD Quiz drop locations › Checks drop locations❌ failure2m 3s 596ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure2m 33s 835ms

@SamuelRoettgermann SamuelRoettgermann temporarily deployed to artemis-test3.artemis.cit.tum.de November 21, 2025 23:01 — with GitHub Actions Inactive
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
src/main/java/de/tum/cit/aet/artemis/exam/dto/ExamUserDTO.java (1)

16-53: Consider moving fromUser(User) mapping out of the DTO to keep layers clean

ExamUserDetailsDTO.fromUser(User user) couples the DTO layer to the User domain type and slightly conflicts with the “dtos:no_entities” guideline. Long‑term, consider moving this mapping into a service/mapper (or a top‑level mapper utility) and keeping the record as a pure data container, especially once Exam Checker v2.0 compatibility can be dropped.

src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java (1)

92-112: Guard seat/room updates to avoid unintentionally clearing actual assignments

actualSeat and actualRoom are always overwritten from examUserDTO.seat() / .room(). In flows that only update signature/flags and pass empty strings, this will erase any existing actual seat/room information.

If the intended behavior is “update seat/room only when a value is actually provided”, consider guarding against null/blank values:

-        examUser.setActualSeat(examUserDTO.seat());
-        examUser.setActualRoom(examUserDTO.room());
+        if (examUserDTO.seat() != null && !examUserDTO.seat().isBlank()) {
+            examUser.setActualSeat(examUserDTO.seat());
+        }
+        if (examUserDTO.room() != null && !examUserDTO.room().isBlank()) {
+            examUser.setActualRoom(examUserDTO.room());
+        }

This keeps existing assignments intact when the client only wants to update signature / check flags.

src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java (1)

124-213: ExamUserDTO usages are aligned, but tests still deserialize as ExamUser

All updated ExamUserDTO constructor calls use the correct extended signature and sensible defaults (empty strings / nulls) for the newly added fields, so the requests look consistent.

However, the tests continue to deserialize the controller response into ExamUser even though the endpoint now returns ExamUserDTO. This works because the JSON fields overlap, but it couples the tests to the entity shape instead of the public DTO contract. Long‑term, consider either:

  • deserializing to ExamUserDTO and asserting on that, or
  • reloading the ExamUser from the repository for entity‑level assertions.

Not urgent, but it will make intent clearer and reduce coupling between web and domain layers.

Also applies to: 223-224, 261-262, 285-286, 305-306

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1fb22d5 and 38e919a.

📒 Files selected for processing (4)
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/ExamUserDTO.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java (3 hunks)
  • src/test/java/de/tum/cit/aet/artemis/core/FileIntegrationTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java (7 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
src/test/java/**/*.java

⚙️ CodeRabbit configuration file

test_naming: descriptive; test_size: small_specific; fixed_data: true; junit5_features: true; assert_use: assertThat; assert_specificity: true; archunit_use: enforce_package_rules; db_query_count_tests: track_performance; util_service_factory_pattern: true; avoid_db_access: true; mock_strategy: static_mocks; context_restart_minimize: true

Files:

  • src/test/java/de/tum/cit/aet/artemis/core/FileIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
src/main/java/**/*.java

⚙️ CodeRabbit configuration file

naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports

Files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/ExamUserDTO.java
🧠 Learnings (34)
📓 Common learnings
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java:266-268
Timestamp: 2025-10-25T22:42:09.687Z
Learning: In ExamRoomDistributionService.getAttendanceCheckerAppInformation method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java, the validation intentionally uses noneMatch to allow partial distributions. This design ensures the iPad attendance checker app remains functional even when students are registered after the initial distribution (e.g., during an exam), preventing the entire app from breaking due to a few missing seat assignments.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/web/ExamRoomDistributionResource.java:62-78
Timestamp: 2025-09-25T20:43:41.712Z
Learning: In the ExamRoomDistributionService.distributeRegisteredStudents method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java, ExamRoom entities are shared resources that are dynamically assigned to exams through the ExamRoomExamAssignment join table. Rooms don't "belong" to exams until the distribution process creates these assignments. The method first clears existing assignments for the exam, then creates new ones for the provided room IDs.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java:13-16
Timestamp: 2025-09-15T11:18:26.439Z
Learning: In ExamRoomDistributionService.distributeRegisteredStudents method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java, the team has decided not to use Transactional annotation despite multiple repository operations, based on human reviewer consultation.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/domain/ExamUser.java:16-17
Timestamp: 2025-09-25T20:28:36.905Z
Learning: In the Artemis codebase, ExamUser entity uses ExamSeatDTO as a transient field for performance reasons. SamuelRoettgermann tested domain value objects but they caused 60x slower performance. This architectural exception is approved by maintainers due to significant performance benefits and Artemis naming convention requirements.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11111
File: src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomIntegrationTest.java:0-0
Timestamp: 2025-08-30T20:20:17.236Z
Learning: In ExamRoomIntegrationTest.validateAdminOverview(), the first assertion should use subset containment (contains) rather than exact equality because the admin overview shows all newest unique exam rooms in the system including those from previous uploads, not just rooms from the current upload being tested. The test only needs to verify that the expected rooms from the current upload are present in the response.
Learnt from: Strohgelaender
Repo: ls1intum/Artemis PR: 8574
File: src/main/java/de/tum/in/www1/artemis/service/tutorialgroups/TutorialGroupService.java:0-0
Timestamp: 2024-10-08T15:35:42.972Z
Learning: The `tryToFindMatchingUsers` method in `TutorialGroupService.java` has been updated to skip registrations without a student, enhancing the method's robustness. This change was implemented in commit `bef30f9751de0913143e8cb28cc0088264052261`.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java:72-79
Timestamp: 2025-09-15T11:21:15.983Z
Learning: SamuelRoettgermann prefers iterative development approach - initial implementations should be working starting points rather than full-fledged, finished implementations. Optimization and robustness improvements can be added later.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java:191-191
Timestamp: 2025-09-25T22:36:36.450Z
Learning: SamuelRoettgermann uses crude/temporary implementations during early development stages for testing and validation purposes, acknowledging they are not production-ready but helpful for confirming functionality works as expected.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/repository/ExamRoomRepository.java:66-82
Timestamp: 2025-09-15T09:49:44.876Z
Learning: SamuelRoettgermann prefers using ROW_NUMBER() with window functions to handle tie-breaking scenarios in SQL queries, particularly when selecting the latest version of entities based on timestamps.
📚 Learning: 2025-09-25T20:28:36.905Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/domain/ExamUser.java:16-17
Timestamp: 2025-09-25T20:28:36.905Z
Learning: In the Artemis codebase, ExamUser entity uses ExamSeatDTO as a transient field for performance reasons. SamuelRoettgermann tested domain value objects but they caused 60x slower performance. This architectural exception is approved by maintainers due to significant performance benefits and Artemis naming convention requirements.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/core/FileIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/ExamUserDTO.java
📚 Learning: 2024-10-15T11:33:17.915Z
Learnt from: alexjoham
Repo: ls1intum/Artemis PR: 9455
File: src/test/java/de/tum/cit/aet/artemis/iris/IrisTextExerciseChatMessageIntegrationTest.java:401-401
Timestamp: 2024-10-15T11:33:17.915Z
Learning: In the Artemis project, when new fields are added to classes like `PyrisChatStatusUpdateDTO`, corresponding tests may be implemented in separate integration test classes such as `IrisChatTokenTrackingIntegrationTest`.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/core/FileIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2024-11-26T20:43:17.588Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9751
File: src/test/java/de/tum/cit/aet/artemis/programming/util/ProgrammingExerciseFactory.java:143-148
Timestamp: 2024-11-26T20:43:17.588Z
Learning: In `src/test/java/de/tum/cit/aet/artemis/programming/util/ProgrammingExerciseFactory.java`, the test package name assigned in `populateUnreleasedProgrammingExercise` does not need to adhere to naming conventions.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/core/FileIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2025-02-06T17:28:16.450Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 10265
File: src/main/resources/templates/dart/test/test/behavior_test.dart:57-67
Timestamp: 2025-02-06T17:28:16.450Z
Learning: In Artemis test files, reflection is intentionally used to bypass potential implementation errors in constructors and setters, allowing tests to produce meaningful results about core functionality even when students haven't implemented everything correctly.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/core/FileIntegrationTest.java
📚 Learning: 2025-07-27T16:51:47.707Z
Learnt from: ekayandan
Repo: ls1intum/Artemis PR: 11119
File: src/test/java/de/tum/cit/aet/artemis/buildagent/service/BuildAgentIntegrationTest.java:97-98
Timestamp: 2025-07-27T16:51:47.707Z
Learning: In BuildAgentIntegrationTest.java, the BuildAgentInformation constructor call with parameters (buildAgentDTO, 2, 0, new ArrayList<>(), BuildAgentInformation.BuildAgentStatus.IDLE, null, null, pauseAfterConsecutiveFailures, 2) is correct and does not require an additional maxConcurrentBuildsAllowed parameter.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/core/FileIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: Strohgelaender
Repo: ls1intum/Artemis PR: 8574
File: src/main/java/de/tum/in/www1/artemis/service/tutorialgroups/TutorialGroupService.java:0-0
Timestamp: 2024-10-08T15:35:42.972Z
Learning: The `tryToFindMatchingUsers` method in `TutorialGroupService.java` has been updated to skip registrations without a student, enhancing the method's robustness. This change was implemented in commit `bef30f9751de0913143e8cb28cc0088264052261`.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/core/FileIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2024-10-28T19:47:50.979Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9609
File: src/main/java/de/tum/cit/aet/artemis/buildagent/service/BuildJobExecutionService.java:421-421
Timestamp: 2024-10-28T19:47:50.979Z
Learning: In `src/main/java/de/tum/cit/aet/artemis/buildagent/service/BuildJobExecutionService.java`, the developer does not expect the list of file extensions in `isValidTestResultFile` to grow and prefers to keep the current implementation without refactoring.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/core/FileIntegrationTest.java
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: valentin-boehm
Repo: ls1intum/Artemis PR: 7384
File: src/test/java/de/tum/in/www1/artemis/exam/StudentExamIntegrationTest.java:988-993
Timestamp: 2024-06-10T19:44:09.116Z
Learning: The `testSubmitStudentExam_differentUser` method does not require additional checks to verify the state of `studentExam1` after receiving a `HttpStatus.FORBIDDEN` because the control flow in the `StudentExamResource` is straightforward and ensures no state change occurs.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/core/FileIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2025-09-15T11:18:26.439Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java:13-16
Timestamp: 2025-09-15T11:18:26.439Z
Learning: In ExamRoomDistributionService.distributeRegisteredStudents method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java, the team has decided not to use Transactional annotation despite multiple repository operations, based on human reviewer consultation.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/ExamUserDTO.java
📚 Learning: 2025-09-25T20:43:41.712Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/web/ExamRoomDistributionResource.java:62-78
Timestamp: 2025-09-25T20:43:41.712Z
Learning: In the ExamRoomDistributionService.distributeRegisteredStudents method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java, ExamRoom entities are shared resources that are dynamically assigned to exams through the ExamRoomExamAssignment join table. Rooms don't "belong" to exams until the distribution process creates these assignments. The method first clears existing assignments for the exam, then creates new ones for the provided room IDs.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/ExamUserDTO.java
📚 Learning: 2025-02-11T12:05:49.151Z
Learnt from: janthoXO
Repo: ls1intum/Artemis PR: 9406
File: src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseParticipationResource.java:209-209
Timestamp: 2025-02-11T12:05:49.151Z
Learning: In ProgrammingExerciseParticipationResource, exam-related authorization checks and sensitive information filtering for results and feedbacks are handled by resultService.filterSensitiveInformationIfNecessary().

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: valentin-boehm
Repo: ls1intum/Artemis PR: 7384
File: src/main/java/de/tum/in/www1/artemis/web/rest/StudentExamResource.java:329-332
Timestamp: 2024-06-10T19:44:09.116Z
Learning: The error message for an already abandoned exam in `submitStudentExam` method of `StudentExamResource.java` does not need to include the student exam ID as it is already included in the error logging.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2025-10-22T21:31:54.240Z
Learnt from: Elfari1028
Repo: ls1intum/Artemis PR: 11491
File: src/main/java/de/tum/cit/aet/artemis/exercise/web/ExerciseResource.java:376-378
Timestamp: 2025-10-22T21:31:54.240Z
Learning: In Artemis, ExerciseVersionService.createExerciseVersion(...) (src/main/java/de/tum/cit/aet/artemis/exercise/service/ExerciseVersionService.java) eagerly re-fetches the target exercise (via type-specific findForVersioningById) before building the ExerciseSnapshotDTO. Controllers (e.g., ExerciseResource.toggleSecondCorrectionEnabled) do not need to reload the exercise before invoking createExerciseVersion.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: valentin-boehm
Repo: ls1intum/Artemis PR: 7384
File: src/test/java/de/tum/in/www1/artemis/exam/StudentExamIntegrationTest.java:2836-2846
Timestamp: 2024-06-10T19:44:09.116Z
Learning: The `testAbandonStudentExamNotInTime` method does not require additional checks to verify the state of `studentExam1` after receiving a `HttpStatus.FORBIDDEN` because the control flow in the `StudentExamResource` is straightforward and ensures no state change occurs.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2024-10-14T10:30:20.109Z
Learnt from: valentin-boehm
Repo: ls1intum/Artemis PR: 7384
File: src/main/java/de/tum/in/www1/artemis/service/exam/StudentExamService.java:295-303
Timestamp: 2024-10-14T10:30:20.109Z
Learning: The `abandonStudentExam` method in `StudentExamService` should not include a null check for the `studentExam` parameter as per the project's coding practices. It is expected that the `studentExam` will never be null at this point in the code, and a `NullPointerException` would indicate a significant issue elsewhere in the codebase.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: valentin-boehm
Repo: ls1intum/Artemis PR: 7384
File: src/main/java/de/tum/in/www1/artemis/web/rest/StudentExamResource.java:892-892
Timestamp: 2024-06-10T19:44:09.116Z
Learning: Valentin-boehm has indicated that including detailed error messages for self-explanatory exceptions such as a BadRequestException when a student exam is already submitted or abandoned is not necessary in the context of `StudentExamResource.java`.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: valentin-boehm
Repo: ls1intum/Artemis PR: 7384
File: src/test/java/de/tum/in/www1/artemis/exam/StudentExamIntegrationTest.java:975-980
Timestamp: 2024-06-10T19:44:09.116Z
Learning: The `testSubmitStudentExam_notInTime` method does not require additional checks to verify the state of `studentExam1` after receiving a `HttpStatus.FORBIDDEN` because the control flow in the `StudentExamResource` is straightforward and ensures no state change occurs.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2024-10-20T18:37:45.365Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 9303
File: src/main/java/de/tum/in/www1/artemis/service/exam/StudentExamService.java:296-300
Timestamp: 2024-10-20T18:37:45.365Z
Learning: When reviewing code changes in `StudentExamService.saveSubmission`, if the PR aims to improve readability without changing logic, avoid suggesting changes that alter logic, such as adding exceptions in the default case of switch statements.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2025-10-20T17:55:26.514Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11514
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomService.java:504-510
Timestamp: 2025-10-20T17:55:26.514Z
Learning: In ExamRoomService.applyXSpaceAndYSpaceFilter (src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomService.java), the xSpace and ySpace parameters intentionally represent exclusive minimums. Seats must be strictly MORE than these distances apart (using <= comparison to reject equal distances). This ensures no seats are placed at exactly the threshold distance.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2025-08-30T20:20:17.236Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11111
File: src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomIntegrationTest.java:0-0
Timestamp: 2025-08-30T20:20:17.236Z
Learning: In ExamRoomIntegrationTest.validateAdminOverview(), the first assertion should use subset containment (contains) rather than exact equality because the admin overview shows all newest unique exam rooms in the system including those from previous uploads, not just rooms from the current upload being tested. The test only needs to verify that the expected rooms from the current upload are present in the response.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2025-09-22T09:02:57.726Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomService.java:315-321
Timestamp: 2025-09-22T09:02:57.726Z
Learning: The createdDate field in ExamRoom entities is non-null as it's required by the database schema, so null-safe comparators are not needed when comparing ExamRoom creation dates.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: julian-christl
Repo: ls1intum/Artemis PR: 7829
File: src/main/java/de/tum/in/www1/artemis/web/rest/ComplaintResponseResource.java:0-0
Timestamp: 2024-10-08T15:35:42.972Z
Learning: The user has fixed the issue regarding the redundant wildcard import in `ComplaintResponseResource.java` by removing it in commit 7e392e0.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2025-09-25T22:36:36.450Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java:191-191
Timestamp: 2025-09-25T22:36:36.450Z
Learning: SamuelRoettgermann uses crude/temporary implementations during early development stages for testing and validation purposes, acknowledging they are not production-ready but helpful for confirming functionality works as expected.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2025-09-15T11:21:15.983Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java:72-79
Timestamp: 2025-09-15T11:21:15.983Z
Learning: SamuelRoettgermann prefers iterative development approach - initial implementations should be working starting points rather than full-fledged, finished implementations. Optimization and robustness improvements can be added later.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8802
File: src/main/resources/templates/rust/exercise/src/context.rs:1-1
Timestamp: 2024-10-08T15:35:42.972Z
Learning: Code inside the `exercise` directories in the Artemis platform is provided to students and is intended for them to implement. TODO comments in these directories are meant to guide students and should not be addressed in the PR.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2025-09-22T08:53:47.961Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomService.java:412-422
Timestamp: 2025-09-22T08:53:47.961Z
Learning: SamuelRoettgermann prefers trusting input data quality over defensive programming for floating-point coordinate grouping in ExamRoomService, reasoning that data from the same source/script should be consistent without precision errors.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: JohannesStoehr
Repo: ls1intum/Artemis PR: 0
File: :0-0
Timestamp: 2024-06-10T19:44:09.116Z
Learning: Admins are included in the `isAtLeastTutor` check, and unauthenticated users cannot access the `CourseTutorialGroupsComponent`.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2025-09-20T16:47:54.380Z
Learnt from: MoritzSpengler
Repo: ls1intum/Artemis PR: 11382
File: src/main/java/de/tum/cit/aet/artemis/quiz/service/QuizTrainingService.java:43-54
Timestamp: 2025-09-20T16:47:54.380Z
Learning: In QuizTrainingService.submitForTraining, cross-course mismatch protection is handled through PreAuthorize("hasAccessToCourse(#courseId)") authorization at the REST layer, ensuring users can only submit for courses they have access to, rather than through explicit courseId validation in the service method.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2025-09-20T16:47:54.380Z
Learnt from: MoritzSpengler
Repo: ls1intum/Artemis PR: 11382
File: src/main/java/de/tum/cit/aet/artemis/quiz/service/QuizTrainingService.java:43-54
Timestamp: 2025-09-20T16:47:54.380Z
Learning: In QuizTrainingService.submitForTraining, cross-course validation is handled by the REST layer through authCheckService.checkHasAtLeastRoleInCourseElseThrow() which validates user access to the course before the service method is called, eliminating the need for additional courseId validation in the service layer.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: jakubriegel
Repo: ls1intum/Artemis PR: 8050
File: src/test/java/de/tum/in/www1/artemis/plagiarism/PlagiarismUtilService.java:62-66
Timestamp: 2024-06-10T19:44:09.116Z
Learning: The `createCourseWithUsers` method in `PlagiarismUtilService.java` uses fixed inputs as it is designed to be a test helper method for simplifying the setup of courses and users in tests.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: Strohgelaender
Repo: ls1intum/Artemis PR: 8677
File: src/main/java/de/tum/in/www1/artemis/service/connectors/localci/buildagent/TestResultXmlParser.java:0-0
Timestamp: 2024-10-08T15:35:42.972Z
Learning: The `TestSuite` constructor in `TestResultXmlParser.java` was improved by using `Objects.requireNonNullElse` to handle null values concisely.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: valentin-boehm
Repo: ls1intum/Artemis PR: 7384
File: src/test/java/de/tum/in/www1/artemis/exam/StudentExamIntegrationTest.java:2804-2810
Timestamp: 2024-06-10T19:44:09.116Z
Learning: The `postWithoutLocation` method used in the `testAbandonStudentExam` test case already checks the response status, ensuring that the abandonment of the exam is accepted.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2025-10-25T22:42:09.687Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java:266-268
Timestamp: 2025-10-25T22:42:09.687Z
Learning: In ExamRoomDistributionService.getAttendanceCheckerAppInformation method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java, the validation intentionally uses noneMatch to allow partial distributions. This design ensures the iPad attendance checker app remains functional even when students are registered after the initial distribution (e.g., during an exam), preventing the entire app from breaking due to a few missing seat assignments.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Build and Push Docker Image / Build linux/arm64 Docker Image for ls1intum/artemis
  • GitHub Check: Build and Push Docker Image / Build linux/amd64 Docker Image for ls1intum/artemis
  • GitHub Check: Build .war artifact
  • GitHub Check: server-style
  • GitHub Check: client-style
  • GitHub Check: server-tests
  • GitHub Check: client-tests
  • GitHub Check: Analyse
  • GitHub Check: bean-instantiation-check
🔇 Additional comments (2)
src/test/java/de/tum/cit/aet/artemis/core/FileIntegrationTest.java (1)

96-104: ExamUserDTO construction correctly adapted to extended record

The updated constructor call aligns with the new ExamUserDTO field order and keeps all additional fields null as expected for this test scenario. No further changes needed here.

src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java (1)

114-121: DTO response mirrors legacy and new fields consistently

The response DTO reuses examUser.getActualRoom()/getActualSeat() for both legacy room/seat and the new actualRoom/actualSeat fields, and includes planned room/seat and ExamUserDetailsDTO. This looks consistent with the compatibility TODOs and should serve both the old Exam Checker 2.0 client and the new app.

@anian03 anian03 temporarily deployed to artemis-test3.artemis.cit.tum.de November 22, 2025 17:23 — with GitHub Actions Inactive
@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report205 ran201 passed3 skipped1 failed1h 11m 54s 276ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/quiz-exercise/QuizExerciseDropLocation.spec.ts
ts.Quiz Exercise Drop Location Spec › DnD Quiz drop locations › Checks drop locations❌ failure2m 3s 152ms

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java (1)

121-131: Align response assertions with new ExamUserDTO response type

These tests still deserialize the /exam-users POST response into ExamUser even though the controller now returns ExamUserDTO. Jackson makes this work today (shared field names), but it couples the tests to the entity shape and hides the DTO contract. Consider switching the deserialization and assertions to ExamUserDTO to lock in the intended API surface.

Also applies to: 220-231, 296-320

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 38e919a and d6abe32.

📒 Files selected for processing (5)
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/ExamUserDTO.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java (3 hunks)
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java (4 hunks)
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java (7 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
src/test/java/**/*.java

⚙️ CodeRabbit configuration file

test_naming: descriptive; test_size: small_specific; fixed_data: true; junit5_features: true; assert_use: assertThat; assert_specificity: true; archunit_use: enforce_package_rules; db_query_count_tests: track_performance; util_service_factory_pattern: true; avoid_db_access: true; mock_strategy: static_mocks; context_restart_minimize: true

Files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
src/main/java/**/*.java

⚙️ CodeRabbit configuration file

naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports

Files:

  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/ExamUserDTO.java
🧠 Learnings (49)
📓 Common learnings
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java:266-268
Timestamp: 2025-10-25T22:42:09.687Z
Learning: In ExamRoomDistributionService.getAttendanceCheckerAppInformation method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java, the validation intentionally uses noneMatch to allow partial distributions. This design ensures the iPad attendance checker app remains functional even when students are registered after the initial distribution (e.g., during an exam), preventing the entire app from breaking due to a few missing seat assignments.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/web/ExamRoomDistributionResource.java:62-78
Timestamp: 2025-09-25T20:43:41.712Z
Learning: In the ExamRoomDistributionService.distributeRegisteredStudents method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java, ExamRoom entities are shared resources that are dynamically assigned to exams through the ExamRoomExamAssignment join table. Rooms don't "belong" to exams until the distribution process creates these assignments. The method first clears existing assignments for the exam, then creates new ones for the provided room IDs.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/domain/ExamUser.java:16-17
Timestamp: 2025-09-25T20:28:36.905Z
Learning: In the Artemis codebase, ExamUser entity uses ExamSeatDTO as a transient field for performance reasons. SamuelRoettgermann tested domain value objects but they caused 60x slower performance. This architectural exception is approved by maintainers due to significant performance benefits and Artemis naming convention requirements.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java:13-16
Timestamp: 2025-09-15T11:18:26.439Z
Learning: In ExamRoomDistributionService.distributeRegisteredStudents method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java, the team has decided not to use Transactional annotation despite multiple repository operations, based on human reviewer consultation.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11111
File: src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomIntegrationTest.java:0-0
Timestamp: 2025-08-30T20:20:17.236Z
Learning: In ExamRoomIntegrationTest.validateAdminOverview(), the first assertion should use subset containment (contains) rather than exact equality because the admin overview shows all newest unique exam rooms in the system including those from previous uploads, not just rooms from the current upload being tested. The test only needs to verify that the expected rooms from the current upload are present in the response.
Learnt from: Strohgelaender
Repo: ls1intum/Artemis PR: 8574
File: src/main/java/de/tum/in/www1/artemis/service/tutorialgroups/TutorialGroupService.java:0-0
Timestamp: 2024-10-08T15:35:42.972Z
Learning: The `tryToFindMatchingUsers` method in `TutorialGroupService.java` has been updated to skip registrations without a student, enhancing the method's robustness. This change was implemented in commit `bef30f9751de0913143e8cb28cc0088264052261`.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java:72-79
Timestamp: 2025-09-15T11:21:15.983Z
Learning: SamuelRoettgermann prefers iterative development approach - initial implementations should be working starting points rather than full-fledged, finished implementations. Optimization and robustness improvements can be added later.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java:191-191
Timestamp: 2025-09-25T22:36:36.450Z
Learning: SamuelRoettgermann uses crude/temporary implementations during early development stages for testing and validation purposes, acknowledging they are not production-ready but helpful for confirming functionality works as expected.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/repository/ExamRoomRepository.java:66-82
Timestamp: 2025-09-15T09:49:44.876Z
Learning: SamuelRoettgermann prefers using ROW_NUMBER() with window functions to handle tie-breaking scenarios in SQL queries, particularly when selecting the latest version of entities based on timestamps.
📚 Learning: 2025-09-25T20:43:41.712Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/web/ExamRoomDistributionResource.java:62-78
Timestamp: 2025-09-25T20:43:41.712Z
Learning: In the ExamRoomDistributionService.distributeRegisteredStudents method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java, ExamRoom entities are shared resources that are dynamically assigned to exams through the ExamRoomExamAssignment join table. Rooms don't "belong" to exams until the distribution process creates these assignments. The method first clears existing assignments for the exam, then creates new ones for the provided room IDs.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2025-09-15T11:18:26.439Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java:13-16
Timestamp: 2025-09-15T11:18:26.439Z
Learning: In ExamRoomDistributionService.distributeRegisteredStudents method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java, the team has decided not to use Transactional annotation despite multiple repository operations, based on human reviewer consultation.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/ExamUserDTO.java
📚 Learning: 2025-08-30T20:20:17.236Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11111
File: src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomIntegrationTest.java:0-0
Timestamp: 2025-08-30T20:20:17.236Z
Learning: In ExamRoomIntegrationTest.validateAdminOverview(), the first assertion should use subset containment (contains) rather than exact equality because the admin overview shows all newest unique exam rooms in the system including those from previous uploads, not just rooms from the current upload being tested. The test only needs to verify that the expected rooms from the current upload are present in the response.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2025-10-25T22:42:09.687Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java:266-268
Timestamp: 2025-10-25T22:42:09.687Z
Learning: In ExamRoomDistributionService.getAttendanceCheckerAppInformation method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java, the validation intentionally uses noneMatch to allow partial distributions. This design ensures the iPad attendance checker app remains functional even when students are registered after the initial distribution (e.g., during an exam), preventing the entire app from breaking due to a few missing seat assignments.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
📚 Learning: 2025-09-25T20:48:13.391Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/test/java/de/tum/cit/aet/artemis/exam/test_repository/ExamRoomTestRepository.java:18-34
Timestamp: 2025-09-25T20:48:13.391Z
Learning: In ExamRoomTestRepository JPQL queries in src/test/java/de/tum/cit/aet/artemis/exam/test_repository/ExamRoomTestRepository.java, CTE (Common Table Expression) syntax with bare attribute names like `roomNumber`, `name`, `createdDate` inside the WITH clause works correctly without requiring entity aliases, confirmed working by SamuelRoettgermann in their Artemis/Hibernate setup.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
📚 Learning: 2025-09-25T20:28:36.905Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/domain/ExamUser.java:16-17
Timestamp: 2025-09-25T20:28:36.905Z
Learning: In the Artemis codebase, ExamUser entity uses ExamSeatDTO as a transient field for performance reasons. SamuelRoettgermann tested domain value objects but they caused 60x slower performance. This architectural exception is approved by maintainers due to significant performance benefits and Artemis naming convention requirements.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/ExamUserDTO.java
📚 Learning: 2025-06-15T04:13:22.541Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 10921
File: src/test/java/de/tum/cit/aet/artemis/exam/ExamIntegrationTest.java:1334-1339
Timestamp: 2025-06-15T04:13:22.541Z
Learning: In Artemis ExamIntegrationTest, time difference assertions use ChronoUnit.MILLIS.between().isLessThan(1) without Math.abs() because the server only stores and retrieves timestamp values without calling now(), making differences predictable and consistent due to serialization/storage precision rather than timing variations.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2025-08-14T21:24:50.201Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11111
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomService.java:150-152
Timestamp: 2025-08-14T21:24:50.201Z
Learning: In the ExamRoomService.parseAndStoreExamRoomDataFromZipFile method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomService.java, IllegalArgumentException cannot be thrown in the try block, so only IOException needs to be caught when parsing ZIP files containing exam room JSON data.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: Strohgelaender
Repo: ls1intum/Artemis PR: 8574
File: src/main/java/de/tum/in/www1/artemis/service/tutorialgroups/TutorialGroupService.java:0-0
Timestamp: 2024-10-08T15:35:42.972Z
Learning: The `tryToFindMatchingUsers` method in `TutorialGroupService.java` has been updated to skip registrations without a student, enhancing the method's robustness. This change was implemented in commit `bef30f9751de0913143e8cb28cc0088264052261`.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-11-26T20:43:17.588Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9751
File: src/test/java/de/tum/cit/aet/artemis/programming/util/ProgrammingExerciseFactory.java:143-148
Timestamp: 2024-11-26T20:43:17.588Z
Learning: In `src/test/java/de/tum/cit/aet/artemis/programming/util/ProgrammingExerciseFactory.java`, the test package name assigned in `populateUnreleasedProgrammingExercise` does not need to adhere to naming conventions.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: JohannesStoehr
Repo: ls1intum/Artemis PR: 0
File: :0-0
Timestamp: 2024-06-10T19:44:09.116Z
Learning: Admins are included in the `isAtLeastTutor` check, and unauthenticated users cannot access the `CourseTutorialGroupsComponent`.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2025-09-20T16:47:54.380Z
Learnt from: MoritzSpengler
Repo: ls1intum/Artemis PR: 11382
File: src/main/java/de/tum/cit/aet/artemis/quiz/service/QuizTrainingService.java:43-54
Timestamp: 2025-09-20T16:47:54.380Z
Learning: In QuizTrainingService.submitForTraining, cross-course validation is handled by the REST layer through authCheckService.checkHasAtLeastRoleInCourseElseThrow() which validates user access to the course before the service method is called, eliminating the need for additional courseId validation in the service layer.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2025-09-20T16:47:54.380Z
Learnt from: MoritzSpengler
Repo: ls1intum/Artemis PR: 11382
File: src/main/java/de/tum/cit/aet/artemis/quiz/service/QuizTrainingService.java:43-54
Timestamp: 2025-09-20T16:47:54.380Z
Learning: In QuizTrainingService.submitForTraining, cross-course mismatch protection is handled through PreAuthorize("hasAccessToCourse(#courseId)") authorization at the REST layer, ensuring users can only submit for courses they have access to, rather than through explicit courseId validation in the service method.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: valentin-boehm
Repo: ls1intum/Artemis PR: 7384
File: src/test/java/de/tum/in/www1/artemis/exam/StudentExamIntegrationTest.java:988-993
Timestamp: 2024-06-10T19:44:09.116Z
Learning: The `testSubmitStudentExam_differentUser` method does not require additional checks to verify the state of `studentExam1` after receiving a `HttpStatus.FORBIDDEN` because the control flow in the `StudentExamResource` is straightforward and ensures no state change occurs.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: jakubriegel
Repo: ls1intum/Artemis PR: 8050
File: src/test/java/de/tum/in/www1/artemis/plagiarism/PlagiarismUtilService.java:62-66
Timestamp: 2024-10-08T15:35:42.972Z
Learning: The `createCourseWithUsers` method in `PlagiarismUtilService.java` uses fixed inputs as it is designed to be a test helper method for simplifying the setup of courses and users in tests.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2025-08-15T00:59:12.716Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11111
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomService.java:15-17
Timestamp: 2025-08-15T00:59:12.716Z
Learning: In ExamRoomService.java, Joda-Time is used specifically for duration formatting because the user needs a formatter that always includes millisecond precision, which they found difficult or impossible to achieve with java.time Duration formatting.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
📚 Learning: 2024-10-14T10:30:20.109Z
Learnt from: valentin-boehm
Repo: ls1intum/Artemis PR: 7384
File: src/main/java/de/tum/in/www1/artemis/service/exam/StudentExamService.java:295-303
Timestamp: 2024-10-14T10:30:20.109Z
Learning: The `abandonStudentExam` method in `StudentExamService` should not include a null check for the `studentExam` parameter as per the project's coding practices. It is expected that the `studentExam` will never be null at this point in the code, and a `NullPointerException` would indicate a significant issue elsewhere in the codebase.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: valentin-boehm
Repo: ls1intum/Artemis PR: 7384
File: src/test/java/de/tum/in/www1/artemis/exam/StudentExamIntegrationTest.java:2836-2846
Timestamp: 2024-06-10T19:44:09.116Z
Learning: The `testAbandonStudentExamNotInTime` method does not require additional checks to verify the state of `studentExam1` after receiving a `HttpStatus.FORBIDDEN` because the control flow in the `StudentExamResource` is straightforward and ensures no state change occurs.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: valentin-boehm
Repo: ls1intum/Artemis PR: 7384
File: src/test/java/de/tum/in/www1/artemis/exam/StudentExamIntegrationTest.java:975-980
Timestamp: 2024-06-10T19:44:09.116Z
Learning: The `testSubmitStudentExam_notInTime` method does not require additional checks to verify the state of `studentExam1` after receiving a `HttpStatus.FORBIDDEN` because the control flow in the `StudentExamResource` is straightforward and ensures no state change occurs.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: valentin-boehm
Repo: ls1intum/Artemis PR: 7384
File: src/test/java/de/tum/in/www1/artemis/exam/StudentExamIntegrationTest.java:2804-2810
Timestamp: 2024-10-08T15:35:42.972Z
Learning: The `postWithoutLocation` method used in the `testAbandonStudentExam` test case already checks the response status, ensuring that the abandonment of the exam is accepted.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2025-02-11T12:05:49.151Z
Learnt from: janthoXO
Repo: ls1intum/Artemis PR: 9406
File: src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseParticipationResource.java:209-209
Timestamp: 2025-02-11T12:05:49.151Z
Learning: In ProgrammingExerciseParticipationResource, exam-related authorization checks and sensitive information filtering for results and feedbacks are handled by resultService.filterSensitiveInformationIfNecessary().

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-10-15T11:33:17.915Z
Learnt from: alexjoham
Repo: ls1intum/Artemis PR: 9455
File: src/test/java/de/tum/cit/aet/artemis/iris/IrisTextExerciseChatMessageIntegrationTest.java:401-401
Timestamp: 2024-10-15T11:33:17.915Z
Learning: In the Artemis project, when new fields are added to classes like `PyrisChatStatusUpdateDTO`, corresponding tests may be implemented in separate integration test classes such as `IrisChatTokenTrackingIntegrationTest`.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: julian-christl
Repo: ls1intum/Artemis PR: 8052
File: src/test/java/de/tum/in/www1/artemis/lecture/CompetencyIntegrationTest.java:310-310
Timestamp: 2024-06-10T19:44:09.116Z
Learning: Modifications to parameters in `competencyProgressUtilService.createCompetencyProgress` for debugging purposes are considered irrelevant to the test outcomes but helpful for clarity during debugging.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: florian-glombik
Repo: ls1intum/Artemis PR: 8597
File: src/main/webapp/app/exercises/programming/manage/repositories-checkout-directories-dto.ts:8-8
Timestamp: 2024-06-10T19:44:09.116Z
Learning: DTOs are typically defined in the `src/main/webapp/app/entities` folder on the client side in the Artemis project.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: julian-christl
Repo: ls1intum/Artemis PR: 7829
File: src/main/java/de/tum/in/www1/artemis/web/rest/ComplaintResponseResource.java:0-0
Timestamp: 2024-10-08T15:35:42.972Z
Learning: The user has fixed the issue regarding the redundant wildcard import in `ComplaintResponseResource.java` by removing it in commit 7e392e0.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2025-09-22T09:02:57.726Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomService.java:315-321
Timestamp: 2025-09-22T09:02:57.726Z
Learning: The createdDate field in ExamRoom entities is non-null as it's required by the database schema, so null-safe comparators are not needed when comparing ExamRoom creation dates.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-10-08T15:35:48.768Z
Learnt from: florian-glombik
Repo: ls1intum/Artemis PR: 8858
File: src/test/javascript/spec/component/shared/exercise-filter/exercise-filter-modal.component.spec.ts:201-225
Timestamp: 2024-10-08T15:35:48.768Z
Learning: Non-null assertions should not be flagged or suggested for removal in the context of PR ls1intum/Artemis#8858.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: JohannesStoehr
Repo: ls1intum/Artemis PR: 8679
File: src/main/java/de/tum/in/www1/artemis/web/rest/tutorialgroups/TutorialGroupSessionResource.java:37-37
Timestamp: 2024-10-08T15:35:42.972Z
Learning: The DTOs `CompetencyProgressForLearningPathDTO`, `ProgrammingExerciseResetOptionsDTO`, and `CourseWithIdDTO` do not contain nullable values or `Optional` types, making the `JsonInclude` annotation unnecessary for them.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/ExamUserDTO.java
📚 Learning: 2024-10-08T15:35:48.767Z
Learnt from: JohannesStoehr
Repo: ls1intum/Artemis PR: 8947
File: src/main/java/de/tum/in/www1/artemis/service/ExerciseService.java:760-762
Timestamp: 2024-10-08T15:35:48.767Z
Learning: Even when the `NotNull` annotation is used, adding a null check in methods is recommended to catch potential issues early and provide clear error messages.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
📚 Learning: 2025-01-28T17:32:42.886Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 10204
File: src/main/java/de/tum/cit/aet/artemis/programming/service/localci/scaparser/strategy/sarif/RubocopMessageProcessor.java:13-25
Timestamp: 2025-01-28T17:32:42.886Z
Learning: In Java, parameters without Nullable annotation are implicitly non-null by contract, so adding explicit null checks for such parameters is redundant.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
📚 Learning: 2025-09-13T13:57:35.790Z
Learnt from: jfr2102
Repo: ls1intum/Artemis PR: 11145
File: src/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIEventListenerService.java:193-197
Timestamp: 2025-09-13T13:57:35.790Z
Learning: In the LocalCIEventListenerService, NotNull annotations are used on event components like MapEntryRemovedEvent.oldValue() to guarantee non-null values rather than using defensive null checks in the event handlers.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
📚 Learning: 2025-08-14T20:54:54.294Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11111
File: src/main/java/de/tum/cit/aet/artemis/exam/domain/room/LayoutStrategy.java:25-36
Timestamp: 2025-08-14T20:54:54.294Z
Learning: In the Artemis codebase, entity fields with `Column(nullable = false)` are considered sufficient for null validation without requiring additional Bean Validation annotations like `NotNull`, as the project follows a pattern of avoiding redundant validation constraints.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
📚 Learning: 2024-07-10T11:38:34.270Z
Learnt from: iyannsch
Repo: ls1intum/Artemis PR: 8965
File: src/main/java/de/tum/in/www1/artemis/domain/ProgrammingExercise.java:312-314
Timestamp: 2024-07-10T11:38:34.270Z
Learning: For the Artemis project, the setter methods for boolean fields can use the primitive type `boolean` instead of the wrapper class `Boolean` to avoid null values and ensure consistency.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: iyannsch
Repo: ls1intum/Artemis PR: 8965
File: src/main/java/de/tum/in/www1/artemis/web/rest/programming/ProgrammingExerciseResource.java:304-308
Timestamp: 2024-10-08T15:35:42.972Z
Learning: For the Artemis project, when checking a primitive `boolean` field like `isAllowOnlineIde`, use direct checks (e.g., `!isAllowOnlineIde`) instead of `Boolean.FALSE.equals()`.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
📚 Learning: 2024-07-10T11:39:26.373Z
Learnt from: iyannsch
Repo: ls1intum/Artemis PR: 8965
File: src/main/java/de/tum/in/www1/artemis/domain/ProgrammingExercise.java:97-98
Timestamp: 2024-07-10T11:39:26.373Z
Learning: For the Artemis project, the field `allowOnlineIde` in the `ProgrammingExercise` class should use the primitive type `boolean` to ensure it is non-nullable.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
📚 Learning: 2024-10-02T06:54:19.897Z
Learnt from: pzdr7
Repo: ls1intum/Artemis PR: 9407
File: src/test/javascript/spec/component/shared/monaco-editor/monaco-editor.service.spec.ts:24-28
Timestamp: 2024-10-02T06:54:19.897Z
Learning: In test cases where a variable is already confirmed to be defined, using the non-null assertion operator `!` is acceptable.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
📚 Learning: 2025-08-14T21:30:54.314Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11111
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomService.java:373-386
Timestamp: 2025-08-14T21:30:54.314Z
Learning: Jackson automatically serializes Java Set collections to JSON arrays, which are then properly handled by TypeScript/JavaScript frontends. There's no need to change Set to List just for frontend compatibility.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
📚 Learning: 2025-09-10T16:35:23.211Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11111
File: src/main/java/de/tum/cit/aet/artemis/exam/domain/room/ExamRoom.java:69-75
Timestamp: 2025-09-10T16:35:23.211Z
Learning: Artemis convention: The term “DTO” is used broadly (includes DAOs/value objects), not strictly client-transport models. Avoid assuming dto.* packages are always API-facing.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java
📚 Learning: 2025-10-22T21:31:54.240Z
Learnt from: Elfari1028
Repo: ls1intum/Artemis PR: 11491
File: src/main/java/de/tum/cit/aet/artemis/exercise/web/ExerciseResource.java:376-378
Timestamp: 2025-10-22T21:31:54.240Z
Learning: In Artemis, ExerciseVersionService.createExerciseVersion(...) (src/main/java/de/tum/cit/aet/artemis/exercise/service/ExerciseVersionService.java) eagerly re-fetches the target exercise (via type-specific findForVersioningById) before building the ExerciseSnapshotDTO. Controllers (e.g., ExerciseResource.toggleSecondCorrectionEnabled) do not need to reload the exercise before invoking createExerciseVersion.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: valentin-boehm
Repo: ls1intum/Artemis PR: 7384
File: src/main/java/de/tum/in/www1/artemis/web/rest/StudentExamResource.java:329-332
Timestamp: 2024-06-10T19:44:09.116Z
Learning: The error message for an already abandoned exam in `submitStudentExam` method of `StudentExamResource.java` does not need to include the student exam ID as it is already included in the error logging.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: valentin-boehm
Repo: ls1intum/Artemis PR: 7384
File: src/main/java/de/tum/in/www1/artemis/web/rest/StudentExamResource.java:892-892
Timestamp: 2024-06-10T19:44:09.116Z
Learning: Valentin-boehm has indicated that including detailed error messages for self-explanatory exceptions such as a BadRequestException when a student exam is already submitted or abandoned is not necessary in the context of `StudentExamResource.java`.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2025-10-20T17:55:26.514Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11514
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomService.java:504-510
Timestamp: 2025-10-20T17:55:26.514Z
Learning: In ExamRoomService.applyXSpaceAndYSpaceFilter (src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomService.java), the xSpace and ySpace parameters intentionally represent exclusive minimums. Seats must be strictly MORE than these distances apart (using <= comparison to reject equal distances). This ensures no seats are placed at exactly the threshold distance.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2025-09-25T22:36:36.450Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java:191-191
Timestamp: 2025-09-25T22:36:36.450Z
Learning: SamuelRoettgermann uses crude/temporary implementations during early development stages for testing and validation purposes, acknowledging they are not production-ready but helpful for confirming functionality works as expected.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2025-09-15T11:21:15.983Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java:72-79
Timestamp: 2025-09-15T11:21:15.983Z
Learning: SamuelRoettgermann prefers iterative development approach - initial implementations should be working starting points rather than full-fledged, finished implementations. Optimization and robustness improvements can be added later.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-10-20T18:37:45.365Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 9303
File: src/main/java/de/tum/in/www1/artemis/service/exam/StudentExamService.java:296-300
Timestamp: 2024-10-20T18:37:45.365Z
Learning: When reviewing code changes in `StudentExamService.saveSubmission`, if the PR aims to improve readability without changing logic, avoid suggesting changes that alter logic, such as adding exceptions in the default case of switch statements.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8802
File: src/main/resources/templates/rust/exercise/src/context.rs:1-1
Timestamp: 2024-10-08T15:35:42.972Z
Learning: Code inside the `exercise` directories in the Artemis platform is provided to students and is intended for them to implement. TODO comments in these directories are meant to guide students and should not be addressed in the PR.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2025-09-22T08:53:47.961Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomService.java:412-422
Timestamp: 2025-09-22T08:53:47.961Z
Learning: SamuelRoettgermann prefers trusting input data quality over defensive programming for floating-point coordinate grouping in ExamRoomService, reasoning that data from the same source/script should be consistent without precision errors.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
📚 Learning: 2024-07-16T19:27:15.402Z
Learnt from: SimonEntholzer
Repo: ls1intum/Artemis PR: 8929
File: src/test/java/de/tum/in/www1/artemis/authentication/UserLocalVcIntegrationTest.java:29-33
Timestamp: 2024-07-16T19:27:15.402Z
Learning: When addressing missing test coverage, ensure that new tests specifically validate the functionality introduced in the PR, such as token-based authentication.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java
🧬 Code graph analysis (1)
src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java (1)
src/test/java/de/tum/cit/aet/artemis/exam/util/ExamRoomZipFiles.java (1)
  • ExamRoomZipFiles (12-93)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: client-tests-selected
  • GitHub Check: client-tests
  • GitHub Check: server-style
  • GitHub Check: server-tests
  • GitHub Check: client-style
  • GitHub Check: Build and Push Docker Image / Build linux/arm64 Docker Image for ls1intum/artemis
  • GitHub Check: Build and Push Docker Image / Build linux/amd64 Docker Image for ls1intum/artemis
  • GitHub Check: Build .war artifact
  • GitHub Check: bean-instantiation-check
  • GitHub Check: Analyse
🔇 Additional comments (5)
src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java (1)

79-120: DTO-based response and tutor access look consistent

Switching the endpoint to @EnforceAtLeastTutor with checkCourseAndExamAccessForTeachingAssistantElseThrow and returning a tailored ExamUserDTO that exposes only attendance‑relevant fields (including the legacy room/seat plus explicit actual/planned fields) is coherent and avoids leaking the entity; no functional issues stand out here.

src/test/java/de/tum/cit/aet/artemis/exam/ExamUserIntegrationTest.java (1)

82-85: Test user setup now matches tutor access requirements

Creating one tutor via userUtilService.addUsers(TEST_PREFIX, NUMBER_OF_STUDENTS, 1, 0, 1); correctly supports the new @WithMockUser(..., roles = "TA") usages and aligns with the controller’s @EnforceAtLeastTutor access.

src/main/java/de/tum/cit/aet/artemis/exam/dto/room/AttendanceCheckerAppExamInformationDTO.java (1)

53-76: Legacy vs modern seating and partial distributions are handled correctly

plannedFrom + actualFrom combined with the hasText(plannedRoom/Seat) filter in AttendanceCheckerAppExamInformationDTO.from(...) give a clean separation between legacy string‑only data and modern transient DTOs, avoid NPEs on unset transients, and still allow partially distributed exams by including only users with a planned seat. This matches the intended “partial distribution should not break the app” behavior.

Also applies to: 138-153

src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomDistributionIntegrationTest.java (1)

212-340: Comprehensive coverage for the new attendance-checker endpoint

The new tests exercise access control (student vs tutor+), error cases (no/undistributed students), modern vs legacy distributions (including partial legacy distributions), and room aggregation, with verifyBasicAttendanceCheckerInformation keeping exam metadata checks concise and robust. This gives strong end‑to‑end confidence in the new /attendance-checker-information endpoint.

src/main/java/de/tum/cit/aet/artemis/exam/dto/ExamUserDTO.java (1)

16-54: Extended ExamUserDTO and nested details DTO are well-scoped for exam-checker compatibility

Adding optional fields for ids/rooms/seats/student image plus the nested ExamUserDetailsDTO (with a fromUser factory) cleanly enriches responses for the exam checker while keeping the original core fields and JSON contract intact; the TODOs and JsonInclude.NON_EMPTY make the legacy support boundary explicit.

@SamuelRoettgermann SamuelRoettgermann temporarily deployed to artemis-test3.artemis.cit.tum.de November 22, 2025 18:51 — with GitHub Actions Inactive
Copy link
Member

@anian03 anian03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on TS3, everything still works on the old iPad app, and the new app works correctly for tutors and instructors

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report205 ran200 passed3 skipped2 failed1h 14m 43s 861ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/quiz-exercise/QuizExerciseDropLocation.spec.ts
ts.Quiz Exercise Drop Location Spec › DnD Quiz drop locations › Checks drop locations❌ failure2m 3s 588ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure2m 37s 953ms

@krusche krusche added this to the 8.6.0 milestone Nov 23, 2025
@krusche krusche changed the title Development: Attendance checker modern iPad endpoint Development: Add new server endpoints for attendance checker app Nov 23, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/main/java/de/tum/cit/aet/artemis/exam/service/ExamService.java (1)

1486-1490: Active exams now visible to tutors/editors as well

Switching to findAllActiveExamsInCoursesWhereAtLeastTutor(...) broadens this API from “instructor-only” to all course staff, which aligns with the attendance-checker goals but may change which users see active exams in any consuming UIs. Please double‑check that every caller of getAllActiveExams(...) is intended to be usable by tutors/editors as well, not just instructors, and that tests cover this broader visibility.

As a minor nit, you could store ZonedDateTime.now() once in a local variable and derive fromDate/toDate from it to avoid the (tiny) window mismatch, but this is purely optional.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d6abe32 and 099debf.

📒 Files selected for processing (2)
  • src/main/java/de/tum/cit/aet/artemis/exam/repository/ExamRepository.java (2 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/service/ExamService.java (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/main/java/**/*.java

⚙️ CodeRabbit configuration file

naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports

Files:

  • src/main/java/de/tum/cit/aet/artemis/exam/repository/ExamRepository.java
  • src/main/java/de/tum/cit/aet/artemis/exam/service/ExamService.java
🧠 Learnings (12)
📓 Common learnings
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java:266-268
Timestamp: 2025-10-25T22:42:09.687Z
Learning: In ExamRoomDistributionService.getAttendanceCheckerAppInformation method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java, the validation intentionally uses noneMatch to allow partial distributions. This design ensures the iPad attendance checker app remains functional even when students are registered after the initial distribution (e.g., during an exam), preventing the entire app from breaking due to a few missing seat assignments.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/web/ExamRoomDistributionResource.java:62-78
Timestamp: 2025-09-25T20:43:41.712Z
Learning: In the ExamRoomDistributionService.distributeRegisteredStudents method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java, ExamRoom entities are shared resources that are dynamically assigned to exams through the ExamRoomExamAssignment join table. Rooms don't "belong" to exams until the distribution process creates these assignments. The method first clears existing assignments for the exam, then creates new ones for the provided room IDs.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/domain/ExamUser.java:16-17
Timestamp: 2025-09-25T20:28:36.905Z
Learning: In the Artemis codebase, ExamUser entity uses ExamSeatDTO as a transient field for performance reasons. SamuelRoettgermann tested domain value objects but they caused 60x slower performance. This architectural exception is approved by maintainers due to significant performance benefits and Artemis naming convention requirements.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java:13-16
Timestamp: 2025-09-15T11:18:26.439Z
Learning: In ExamRoomDistributionService.distributeRegisteredStudents method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java, the team has decided not to use Transactional annotation despite multiple repository operations, based on human reviewer consultation.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11111
File: src/test/java/de/tum/cit/aet/artemis/exam/ExamRoomIntegrationTest.java:0-0
Timestamp: 2025-08-30T20:20:17.236Z
Learning: In ExamRoomIntegrationTest.validateAdminOverview(), the first assertion should use subset containment (contains) rather than exact equality because the admin overview shows all newest unique exam rooms in the system including those from previous uploads, not just rooms from the current upload being tested. The test only needs to verify that the expected rooms from the current upload are present in the response.
Learnt from: Strohgelaender
Repo: ls1intum/Artemis PR: 8574
File: src/main/java/de/tum/in/www1/artemis/service/tutorialgroups/TutorialGroupService.java:0-0
Timestamp: 2024-10-08T15:35:42.972Z
Learning: The `tryToFindMatchingUsers` method in `TutorialGroupService.java` has been updated to skip registrations without a student, enhancing the method's robustness. This change was implemented in commit `bef30f9751de0913143e8cb28cc0088264052261`.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java:72-79
Timestamp: 2025-09-15T11:21:15.983Z
Learning: SamuelRoettgermann prefers iterative development approach - initial implementations should be working starting points rather than full-fledged, finished implementations. Optimization and robustness improvements can be added later.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/web/ExamUserResource.java:191-191
Timestamp: 2025-09-25T22:36:36.450Z
Learning: SamuelRoettgermann uses crude/temporary implementations during early development stages for testing and validation purposes, acknowledging they are not production-ready but helpful for confirming functionality works as expected.
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/repository/ExamRoomRepository.java:66-82
Timestamp: 2025-09-15T09:49:44.876Z
Learning: SamuelRoettgermann prefers using ROW_NUMBER() with window functions to handle tie-breaking scenarios in SQL queries, particularly when selecting the latest version of entities based on timestamps.
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: Strohgelaender
Repo: ls1intum/Artemis PR: 8574
File: src/main/java/de/tum/in/www1/artemis/service/tutorialgroups/TutorialGroupService.java:0-0
Timestamp: 2024-10-08T15:35:42.972Z
Learning: The `tryToFindMatchingUsers` method in `TutorialGroupService.java` has been updated to skip registrations without a student, enhancing the method's robustness. This change was implemented in commit `bef30f9751de0913143e8cb28cc0088264052261`.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/repository/ExamRepository.java
  • src/main/java/de/tum/cit/aet/artemis/exam/service/ExamService.java
📚 Learning: 2025-09-15T11:18:26.439Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java:13-16
Timestamp: 2025-09-15T11:18:26.439Z
Learning: In ExamRoomDistributionService.distributeRegisteredStudents method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java, the team has decided not to use Transactional annotation despite multiple repository operations, based on human reviewer consultation.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/repository/ExamRepository.java
  • src/main/java/de/tum/cit/aet/artemis/exam/service/ExamService.java
📚 Learning: 2025-09-25T20:48:13.391Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/test/java/de/tum/cit/aet/artemis/exam/test_repository/ExamRoomTestRepository.java:18-34
Timestamp: 2025-09-25T20:48:13.391Z
Learning: In ExamRoomTestRepository JPQL queries in src/test/java/de/tum/cit/aet/artemis/exam/test_repository/ExamRoomTestRepository.java, CTE (Common Table Expression) syntax with bare attribute names like `roomNumber`, `name`, `createdDate` inside the WITH clause works correctly without requiring entity aliases, confirmed working by SamuelRoettgermann in their Artemis/Hibernate setup.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/repository/ExamRepository.java
📚 Learning: 2025-06-17T12:31:09.178Z
Learnt from: jfr2102
Repo: ls1intum/Artemis PR: 10983
File: src/main/java/de/tum/cit/aet/artemis/exercise/repository/StudentParticipationRepository.java:110-126
Timestamp: 2025-06-17T12:31:09.178Z
Learning: The query `findByExamIdWithEagerLatestLegalSubmissionsRatedResultAndIgnoreTestRunParticipation` in StudentParticipationRepository fetches all rated results (not just the latest) because the second correction round feature requires access to multiple assessment results per submission for proper correction round management.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/repository/ExamRepository.java
📚 Learning: 2025-09-18T20:55:38.115Z
Learnt from: marlonnienaber
Repo: ls1intum/Artemis PR: 11350
File: src/main/java/de/tum/cit/aet/artemis/tutorialgroup/repository/TutorialGroupRepository.java:145-168
Timestamp: 2025-09-18T20:55:38.115Z
Learning: In tutorial groups, every TutorialGroup is guaranteed to have a teachingAssistant (non-null constraint), so teaching assistant associations don't require LEFT JOINs in JPQL queries. Only optional associations like tutorialGroupSchedule and tutorialGroupChannel need LEFT JOINs.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/repository/ExamRepository.java
📚 Learning: 2025-09-13T15:47:08.214Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11378
File: src/main/java/de/tum/cit/aet/artemis/exam/repository/ExamRoomExamAssignmentRepository.java:21-23
Timestamp: 2025-09-13T15:47:08.214Z
Learning: Spring Data JPA can resolve nested properties in derived query method names. For example, if an entity has a field `Exam exam`, a method named `deleteAllByExamId(long examId)` will correctly resolve to `exam.id` even without a direct `examId` field. Spring Data first looks for direct field matches, then tries nested property paths when direct matches aren't found. This is standard Spring Data JPA behavior and should not be flagged as incorrect.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/repository/ExamRepository.java
📚 Learning: 2025-09-20T16:43:32.823Z
Learnt from: MoritzSpengler
Repo: ls1intum/Artemis PR: 11382
File: src/main/java/de/tum/cit/aet/artemis/quiz/service/QuizQuestionProgressService.java:130-137
Timestamp: 2025-09-20T16:43:32.823Z
Learning: The findAllDueQuestions method exists in QuizQuestionRepository and accepts Set<Long> ids, Long courseId, and Pageable parameters, returning Page<QuizQuestion>. The method has a Query annotation that filters by courseId, isOpenForPractice = TRUE, and excludes questions with IDs in the provided set using NOT IN.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/repository/ExamRepository.java
  • src/main/java/de/tum/cit/aet/artemis/exam/service/ExamService.java
📚 Learning: 2025-09-20T16:43:32.823Z
Learnt from: MoritzSpengler
Repo: ls1intum/Artemis PR: 11382
File: src/main/java/de/tum/cit/aet/artemis/quiz/service/QuizQuestionProgressService.java:130-137
Timestamp: 2025-09-20T16:43:32.823Z
Learning: The findAllDueQuestions method exists in QuizQuestionRepository and accepts Set<Long> ids, Long courseId, and Pageable parameters, returning Page<QuizQuestion>. This method is properly implemented and available for use in QuizQuestionProgressService.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/repository/ExamRepository.java
📚 Learning: 2025-09-25T20:43:41.712Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 11419
File: src/main/java/de/tum/cit/aet/artemis/exam/web/ExamRoomDistributionResource.java:62-78
Timestamp: 2025-09-25T20:43:41.712Z
Learning: In the ExamRoomDistributionService.distributeRegisteredStudents method in src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java, ExamRoom entities are shared resources that are dynamically assigned to exams through the ExamRoomExamAssignment join table. Rooms don't "belong" to exams until the distribution process creates these assignments. The method first clears existing assignments for the exam, then creates new ones for the provided room IDs.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/service/ExamService.java
📚 Learning: 2025-02-11T12:05:49.151Z
Learnt from: janthoXO
Repo: ls1intum/Artemis PR: 9406
File: src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseParticipationResource.java:209-209
Timestamp: 2025-02-11T12:05:49.151Z
Learning: In ProgrammingExerciseParticipationResource, exam-related authorization checks and sensitive information filtering for results and feedbacks are handled by resultService.filterSensitiveInformationIfNecessary().

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/service/ExamService.java
📚 Learning: 2025-10-22T21:31:54.240Z
Learnt from: Elfari1028
Repo: ls1intum/Artemis PR: 11491
File: src/main/java/de/tum/cit/aet/artemis/exercise/web/ExerciseResource.java:376-378
Timestamp: 2025-10-22T21:31:54.240Z
Learning: In Artemis, ExerciseVersionService.createExerciseVersion(...) (src/main/java/de/tum/cit/aet/artemis/exercise/service/ExerciseVersionService.java) eagerly re-fetches the target exercise (via type-specific findForVersioningById) before building the ExerciseSnapshotDTO. Controllers (e.g., ExerciseResource.toggleSecondCorrectionEnabled) do not need to reload the exercise before invoking createExerciseVersion.

Applied to files:

  • src/main/java/de/tum/cit/aet/artemis/exam/service/ExamService.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Build and Push Docker Image / Build linux/amd64 Docker Image for ls1intum/artemis
  • GitHub Check: Build and Push Docker Image / Build linux/arm64 Docker Image for ls1intum/artemis
  • GitHub Check: Build .war artifact
  • GitHub Check: client-style
  • GitHub Check: server-style
  • GitHub Check: client-tests
  • GitHub Check: Analyse
  • GitHub Check: server-tests
  • GitHub Check: bean-instantiation-check
🔇 Additional comments (1)
src/main/java/de/tum/cit/aet/artemis/exam/repository/ExamRepository.java (1)

95-114: JPQL access predicate correctly broadened to “at least tutor”

The documentation, method name (findAllActiveExamsInCoursesWhereAtLeastTutor), and JPQL predicate now consistently model “course staff (instructor/editor/TA)” access to active exams. The OR condition on the three group-name fields looks correct and matches how other exam visibility logic handles staff roles.

Assuming the new attendance-checker flows rely on tutor access, this repository change is a good alignment with the updated service and resource layers.

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report215 ran209 passed3 skipped3 failed1h 16m 40s 471ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/atlas/CompetencyManagement.spec.ts
ts.Competency Management › Creates a competency❌ failure2m 3s 382ms
ts.Prerequisite Management › Creates a prerequisite❌ failure2m 3s 386ms
ts.Prerequisite Management › Prerequisite editing › Edits a prerequisite❌ failure2m 3s 953ms

@krusche krusche merged commit 84f4944 into develop Nov 23, 2025
28 of 32 checks passed
@github-project-automation github-project-automation bot moved this from Ready For Review to Merged in Artemis Development Nov 23, 2025
@krusche krusche deleted the feature/exam-mode/iPad-attendance-checker-endpoints branch November 23, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client Pull requests that update TypeScript code. (Added Automatically!) core Pull requests that affect the corresponding module exam Pull requests that affect the corresponding module ready to merge server Pull requests that update Java code. (Added Automatically!) tests

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

5 participants